export default{
	methods:{
		weChatPay(url, data){
			return new Promise((resolve, reject) => {
				this.$reqPost(url, JSON.stringify(data)).then(reObj=>{
					let params = reObj.Data.respData
					wx.requestPayment({
						'provider': 'wxpay',
						'timeStamp': params.payTimeStamp,
						'nonceStr': params.paynonceStr,
						'package': params.payPackage,
						'signType': params.paySignType,
						'paySign': params.paySign,
						'success': resData => {
							resolve(resData)
						},
						'fail': err => {
							reject(err)
						}
					})
				})
			})
		}
	}
}